import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { UserModule } from './user/user.module';
import { Permission } from './user/entities/permission.entity';
import { ConfigModule } from '@nestjs/config';
import { DbModule } from 'libs/db/src';
import { JwtAuthGuard } from './jwt.auth.guard';
import { APP_GUARD } from '@nestjs/core';
import { WebLinkModule } from './web-link/web-link.module';
import { SqlTaskService } from './common/timeTask/sqlTask';
import { ScheduleModule } from '@nestjs/schedule';
import { BlogModule } from './blog/blog.module';

@Module({
  imports: [ 
    UserModule,
    DbModule,
    WebLinkModule,
    BlogModule
  ],
  controllers: [AppController],
  providers: [AppService,{
    provide: APP_GUARD,
    useClass: JwtAuthGuard,
    }
],
})
export class AppModule {}
